<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8"/>
    <title>添加用户</title>
    <link th:href="@{/static/bootstrap/css/bootstrap.min.css}" rel="stylesheet"/>
</head>
<body>
<div class="container">
    <div class="row" style="margin-top: 10px">
        <form class="col-sm-10 col-sm-offset-1" th:action="@{/user/add}" method="post">
            <div class="form-group">
                <label>登陆名</label>
                <input type="text" name="name" placeholder="登陆账号" class="form-control"/>
            </div>
            <div class="form-group">
                <label>密码</label>
                <input type="text" name="password" placeholder="密码" class="form-control"/>
            </div>
            <div class="radio">
                <label>
                    <input type="radio" id="noLock" name="locked" value="1" checked="checked"/>
                    不锁定
                </label>
            </div>
            <div class="radio">
                <label>
                    <input type="radio" id="lock" name="locked" value="0"/>
                    锁定
                </label>
            </div>


            <div class="form-group">
                <label>用户名</label>
                <input class="form-control" type="text" name="nickname" placeholder="用户名"/>
            </div>
            <div class="form-group">
                <label class="control-label">选择分组</label>
                <select name="group.id" class="form-control">
                    <option th:each="g:${groups}" th:value="${g.id}" th:text="${g.name}"></option>
                </select>
            </div>
            <div class="form-group">
                <label class="control-label">选择角色</label>
                <select name="role.id" class="form-control">
                    <option th:each="r:${roles}" th:value="${r.id}" th:text="${r.name}"></option>

                </select>
            </div>
            <button type="submit" class="btn btn-primary btn-block">提交</button>
        </form>
    </div>
</div>
</body>
</html>